package service.exception;

public class PayException extends Exception {

    /**
     * 
     */
    private static final long serialVersionUID = 5977866516569642890L;

    public enum CODE {
        UNKNOWN,
        INVALID_PULL_DATE_OR_AMOUNT,
        INVALID_DUE_DATE_OR_AMOUNT,
        INVALID_STATUS_FOR_PULL,
        TOO_EARLY_TO_PULL,
        TOO_EARLY_TO_PROCESS,
        INVALID_LOAN_STATUS,
        INVALID_PAY_STATUS,
        INVALID_BALANCE_TO_DISPUSE,
        INVALID_DISTRIBUTION,
        LARGE_AMOUNT_TO_DISPURSE,
        INVALID_PAY_LIST,
        INVALID_RECEIVEAMT;
    }

    private CODE m_code;

    public PayException(CODE code) {
        super(code.toString());
        this.m_code = code;
    }

    public PayException(CODE code, Exception e) {
        super(e);
        this.m_code = code;
    }

}
